package baiqi.sishen.community.execption;

/**
 * @author 兕神
 * @version 1.0
 * DateTime: 2023/5/1
 */

public class CustomizeException extends RuntimeException {

    //自定义报错码
    private Integer code;
    //报错内容
    private String message;

    public CustomizeException(ICustomizeErrorCode customizeErrorCode) {
        this.code = customizeErrorCode.getCode();
        this.message = customizeErrorCode.getMessage();
    }

    public Integer getCode() {
        return code;
    }

    @Override
    public String getMessage() {
        return message;
    }
}
